package com.twq.patternmatch.patternusages

import com.twq.patternmatch.basic.{BinOp, Number}

/**
 * Created by tangweiqun on 2017/12/9.
 */
object Variable {
  def main(args: Array[String]): Unit = {
    //1、模式在变量定义中的使用
    val myTuple = (123, "abc")
    val (number, string) = myTuple

    val exp = new BinOp("*", Number(5), Number(1))
    val BinOp(op, left, right) = exp
  }
}
